package com.acsior.hibernate.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;

/**
 * PostcardService entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "postcard_services")
@GeneratorKey(tableName = "service_requests")
public class PostcardServiceVO extends ServiceRequestVO {

	private static final long serialVersionUID = 3251285875765442626L;

	@Column(name = "barcode", length = 100)
	private String barcode;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "recipient_customer_id", nullable = false)
	private CustomerVO customerByRecipientCustomer;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "sender_customer_id", nullable = false)
	private CustomerVO customerBySenderCustomer;

	@Column(name = "message", nullable = false, length = 1000)
	private String message;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "postman_id")
	private PostmanVO postman;

	@Column(name = "receive_date", length = 23)
	private Date receiveDate;

	@Column(name = "register_date", length = 23)
	private Date registerDate;

	@Column(name = "sent_page_count", nullable = false)
	private Integer sentPageCount;

	/** default constructor */
	public PostcardServiceVO() {
		super();
	}

	/** @return the barcode */
	public String getBarcode() {
		return this.barcode;
	}

	/** @return the customerByRecipientCustomer */
	public CustomerVO getCustomerByRecipientCustomer() {
		return this.customerByRecipientCustomer;
	}

	/** @return the customerBySenderCustomer */
	public CustomerVO getCustomerBySenderCustomer() {
		return this.customerBySenderCustomer;
	}

	/** @return the message */
	public String getMessage() {
		return this.message;
	}

	/** @return the postman */
	public PostmanVO getPostman() {
		return this.postman;
	}

	/** @return the receiveDate */
	public Date getReceiveDate() {
		return this.receiveDate;
	}

	/** @return the registerDate */
	public Date getRegisterDate() {
		return this.registerDate;
	}

	/** @return the sentPageCount */
	public Integer getSentPageCount() {
		return this.sentPageCount;
	}

	/** @param barcode */
	public void setBarcode(String barcode) {
		this.barcode = barcode;
	}

	/**
	 * @param customerByRecipientCustomer
	 *            the customerByRecipientCustomer to set
	 */
	public void setCustomerByRecipientCustomer(CustomerVO customerByRecipientCustomer) {
		this.customerByRecipientCustomer = customerByRecipientCustomer;
	}

	/**
	 * @param customerBySenderCustomer
	 *            the customerBySenderCustomer to set
	 */
	public void setCustomerBySenderCustomer(CustomerVO customerBySenderCustomer) {
		this.customerBySenderCustomer = customerBySenderCustomer;
	}

	/**
	 * @param message
	 *            the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}

	/** @param postman */
	public void setPostman(PostmanVO postman) {
		this.postman = postman;
	}

	/**
	 * @param receiveDate
	 *            the receiveDate to set
	 */
	public void setReceiveDate(Date receiveDate) {
		this.receiveDate = receiveDate;
	}

	/** @param registerDate */
	public void setRegisterDate(Date registerDate) {
		this.registerDate = registerDate;
	}

	/**
	 * @param sentPageCount
	 *            the sentPageCount to set
	 */
	public void setSentPageCount(Integer sentPageCount) {
		this.sentPageCount = sentPageCount;
	}

}